package ssm.blog.util;

import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

/**
 * @program: blog
 * @description: Response工具类
 * @author: Lyon
 * @create: 2018-04-26 22:08
 **/
public class ResponseUtil {
    public static void write(HttpServletResponse response,Object object)throws Exception{
        //设置编码
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out=response.getWriter();
        out.println(object.toString());
        out.flush();
        out.close();
    }
}
